<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .container {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      /* 两列等宽 */
      gap: 20px;
      /* 项目之间的间距 */
      padding: 20px;
      /* 和边缘的间距 = gap */
      box-sizing: border-box;
    }

    .item {
      background: lightblue;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: bold;
      aspect-ratio: 1 / 1;
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
  </div>

</body>

</html>